package com.gudaomai.ekproject.service;

import java.util.List;

import com.gudaomai.ekproject.common.CommonException;
import com.gudaomai.ekproject.entity.Role;
import com.gudaomai.ekproject.entity.Sysuser;
import com.gudaomai.ekproject.entity.UserRole;
import com.gudaomai.ekproject.service.BaseService;

/**
 * <p>
 * user_role 服务类
 * </p>
 *
 * @author zenghualu
 * @since 2017-06-26
 */
public interface IUserRoleService extends BaseService<UserRole> {

	//添加用户角色
	public void add(Sysuser user, Role role) throws CommonException;

	//通过用户id获取用户所有角色
	public List<UserRole> getRolesByUserId(String uid) throws CommonException;

	//通过uid,rid判断该用户角色是否存在
	public boolean isExist(String uid, String rid) throws CommonException;

}
